package cn.stronglink.assetmanage.entity;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Keep;
import org.greenrobot.greendao.annotation.Property;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Transient;

/**
 * Created by Tgb on 2018/6/5.
 */
@Entity
public class User {
    @Transient
    private static User instance;

    public static User getInstance() {
        if(instance==null){
            instance = new User();
        }
        return instance;
    }

    @Id
    private Long user_id;           //主键id
    @Property
    private String id_;
    @Property
    private String account;
    @Property
    private  String password;
    @Property
    private String name;
    public String getName() {
        return this.name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getPassword() {
        return this.password;
    }
    public void setPassword(String password) {
        this.password = password;
    }
    public String getAccount() {
        return this.account;
    }
    public void setAccount(String account) {
        this.account = account;
    }
    public String getId_() {
        return this.id_;
    }
    public void setId_(String id_) {
        this.id_ = id_;
    }
    public Long getUser_id() {
        return this.user_id;
    }
    public void setUser_id(Long user_id) {
        this.user_id = user_id;
    }
    @Keep
    public User(Long user_id, String id_, String account, String password,
            String name) {
        this.user_id = user_id;
        this.id_ = id_;
        this.account = account;
        this.password = password;
        this.name = name;
    }
    @Keep
    public User() {
    }

    @Override
    public String toString() {
        return name;
    }
}
